<Query Kind="Program" />

void Main()
{
	IStrategy strategyA = new StrategyA();
	Context contextA = new Context(strategyA);
	contextA.oper();

	IStrategy strategyB = new StrategyB();
	Context contextB = new Context(strategyB);
	contextB.oper();
}

interface IStrategy
{
	void Do();
}

class StrategyA : IStrategy{
	public void Do(){
		Console.WriteLine("这里是StrategyA");
	}
}

class StrategyB : IStrategy
{
	public void Do()
	{
		Console.WriteLine("这里是StrategyB");
	}
}

class Context{
	IStrategy _strategy;
	public Context(IStrategy strategy){
		_strategy = strategy;
	}
	
	public void oper(){
		_strategy.Do();
	}
}

